package com.yanqu.road.entity.activity.ghost;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.player.UserBaseInfo;

@FieldTypeAnnotation(tableName = "t_c_activity_ghost_attack_record")
public class GhostAttackRecord extends DataObject {
    @FieldTypeAnnotation(select = true, update = true)
    int activityId;
    @FieldTypeAnnotation(desc = "批次号", select = true, update = true)
    int batchNo;
    @FieldTypeAnnotation(update = true)
    int bossId;
    @FieldTypeAnnotation(update = true)
    long serverId;
    @FieldTypeAnnotation(update = true)
    long userId;
    @FieldTypeAnnotation(desc = "用户信息")
    UserBaseInfo userBaseInfo = new UserBaseInfo();
    @FieldTypeAnnotation(desc = "用户伤害")
    long damage;
    @FieldTypeAnnotation(desc = "最新更新时间")
    long updateTime;

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public void setBossId(int bossId) {
        if (this.bossId != bossId) {
            this.bossId = bossId;
            setOp(DataStatus.Update);
        }
    }

    public void setServerId(long serverId) {
        if (this.serverId != serverId) {
            this.serverId = serverId;
            setOp(DataStatus.Update);
        }
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public void setDamage(long damage) {
        if (this.damage != damage) {
            this.damage = damage;
            setOp(DataStatus.Update);
        }
    }

    public void setUpdateTime(long updateTime) {
        if (this.updateTime != updateTime) {
            this.updateTime = updateTime;
            setOp(DataStatus.Update);
        }
    }

    public void setBatchNo(int batchNo) {
        if (this.batchNo != batchNo) {
            this.batchNo = batchNo;
            setUpdateOption();
        }
    }

    public int getActivityId() {
        return activityId;
    }

    public int getBatchNo() {
        return batchNo;
    }

    public int getBossId() {
        return bossId;
    }

    public long getServerId() {
        return serverId;
    }

    public long getUserId() {
        return userId;
    }

    public UserBaseInfo getUserBaseInfo() {
        return userBaseInfo;
    }

    public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
        this.userBaseInfo = userBaseInfo;
        setUpdateOption();
    }

    public long getDamage() {
        return damage;
    }

    public long getUpdateTime() {
        return updateTime;
    }
}
